﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BattleDotNet;
using BattleDotNet.Objects.WoW;

namespace test_data_collector
{
    public partial class Form1 : Form
    {
        private Auctions results2;
        private int count;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
                        WoWClient client = new WoWClient();
            /*IEnumerable<RealmStatus> result = client.GetRealmStatuses();
            foreach (var nn in result)
            {
                Console.WriteLine(nn.Name);//"it is " + t + "\r\n");
            }*/
            /*IEnumerable<Auctions> */
            results2 = client.GetAuctions("fizzcrank");

            foreach (var tt in results2.Horde)
            {
               dataGridView1.Rows.Add(tt.ID,tt.Bid,tt.Buyout,tt.ItemID,tt.OwnerName,tt.Quantity,tt.TimeLeft);

                Console.WriteLine(tt.Quantity);
            }
            Console.WriteLine(results2);
            label1.Text = dataGridView1.RowCount.ToString();
            }

        private void bindingSource1_CurrentChanged(object sender, EventArgs e)
        {

        }

        }
    }

